package com.nwcl.basic.service;

import com.nwcl.basic.bo.UserIntegralBO;

import java.math.BigDecimal;

/**
 * @author liguiqin
 * @date 2023/5/23
 */
public interface UserIntegralService {
    /*
     * @Description: 获取用户积分
     * @Author liguiqin
     * @Date 2023/5/29 17:34
     * @param: userId
     * @return java.math.BigDecimal
     * @UpdateDate 2023/5/29 17:34
     **/
    BigDecimal getIntegralByUser(Integer userId);

    /*
     * @Description:  扣减积分
     * @Author liguiqin
     * @Date 2023/5/29 17:34
     * @param: userId 用户id
     * @param: integral 积分
     * @param: orderId 订单id
     * @return void
     * @UpdateDate 2023/5/29 17:34
     **/
    void deduction(Integer userId, BigDecimal integral, Integer orderId);

    /*
     * @Description: 发放积分
     * @Author liguiqin
     * @Date 2023/5/29 17:34
     * @param: userIntegralBO
     * @return void
     * @UpdateDate 2023/5/29 17:34
     **/
    void save(UserIntegralBO userIntegralBO);
}
